// mongodb node的驱动程序
const mongoose = require("mongoose");
const { schedules } = require("./data/schedules.js")

// 执行schedules创建model文件
mongoose.connect("mongodb://tangzhenhua:Lovo123456@182.92.214.223:8084/chenpeng", {
  useNewUrlParser: true,
  useUnifiedTopology: true,
  auth: { authSource: "admin" }
}, async () => {
  // 获取model
  const schedulesModel = mongoose.model("schedules");
  await schedulesModel.create(schedules); //创建排片数据
})
